package com.zhuannimei.adapter;

import java.util.List;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.zhuannimei.R;
import com.zhuannimei.domain.JoinPeople;
import com.zhuannimei.utility.JackViewHolder;
import com.zhuannimei.utility.TextHelper;

/**
 * @fileName JoinListAdapter.java
 * @package com.zhuannimei.adapter
 * @description 
 * @author 大熊
 * @email 651319154@qq.com
 * @version 1.0
 *  
 */
public class JoinListAdapter extends BaseObjectListAdapter {

	public JoinListAdapter(Context context, List<? extends Object> datas) {
		super(context, datas);
	}
	
	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		if(convertView==null){
			convertView = View.inflate(mContext, R.layout.join_us_list,null);
		}
		TextView mTvName = JackViewHolder.get(convertView, R.id.join_tv_name);
		TextView mTvNumber = JackViewHolder.get(convertView, R.id.join_tv_number);
		TextView mTvTime = JackViewHolder.get(convertView, R.id.join_time_tv);
		JoinPeople jp = (JoinPeople) mDatas.get(position);
		mTvName.setText(jp.getUserName());
		mTvNumber.setText("购买了"+jp.getNumber()+"个幸运码");
		mTvTime.setText(TextHelper.shortTime(jp.getCrtime()));
		return convertView;
	}

}
